/***********************************************************************************
Copy right:	    Coffee Tech.
Author:         jiaoyue
Date:           2022-03-24
Description:    http请求自定义处理部分
***********************************************************************************/

#ifndef CUSTOM_HANDLE_H
#define CUSTOM_HANDLE_H

#include <stdio.h>
#include <string.h>
//序列化json
#include "cJSON.h"
#include "msg_queue_peer.h"
#include "shmem.h"

#define BUFFERSIZE 32

union val_t
{
	int b_val;
	int i_val;
	float f_val;
};
struct std_node
{
	int key;  //唯一key
	char name[BUFFERSIZE]; //设备名
	int type;
	int dev_type;
	union val_t old_val;
	union val_t new_val;
	int ret;
};

struct msgbuf
{
	long mtype;
	char mdata[256];
};

extern struct shm_param para;


int parse_and_process(int sock, const char *query_string, const char *input);

#endif  // CUSTOM_HANDLE_H
